﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;
using System.Globalization;

namespace AsiaSnackExpress
{
    public partial class main : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnEng_Click(object sender, ImageClickEventArgs e)
        {
            //Sets the cookie that is to be used by Global.asax
            HttpCookie cookie = new HttpCookie("CultureInfo");
            cookie.Value = "en-US";
            Response.Cookies.Add(cookie);

            //Set the culture and reload for immediate effect. 
            //Future effects are handled by Global.asax
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            Server.Transfer(Request.Path);

        }

        protected void btnGer_Click(object sender, ImageClickEventArgs e)
        {
            //Sets the cookie that is to be used by Global.asax
            HttpCookie cookie = new HttpCookie("CultureInfo");
            cookie.Value = "de-DE";
            Response.Cookies.Add(cookie);

            //Set the culture and reload for immediate effect. 
            //Future effects are handled by Global.asax
            Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
            Server.Transfer(Request.Path);

        }
    }
}